#include<stdio.h>
#include<stdlib.h>
#define MAX_N 10002
int N = 10000;
int flag[MAX_N];

void dig(int start){
    if(start >= N)
        return;
    int i = start, rem,t,j;
    while(i<N){
        t = 0;
        rem = i;
        while(rem > 0){
            t += rem%10;
            rem = rem/10;
        }
        i = i + t;
        if(i<N)
            flag[i] = 1;
    }
    for(j=start+1;j<N&&flag[j]==1;j++);
    if(j<N){
        printf("%d\n",j);
        dig(j);
    }
}

int main(){
    int i;
    memset(flag,-1,sizeof(MAX_N));
    flag[1] = 0;
    printf("1\n");
    dig(1);
    return 0;
}
